

$(function(){
	$(".cai_tu").click(function(){
		$(".cai_list").slideToggle();
		})	
	$(".cai_list").click(function(){
			$(".cai_list").hide();
		})
	})
jQuery(document).ready(function($) {
    var is_bouncy_nav_animating = false;
    //寮瑰嚭鑿滃崟
    $('.cd-bouncy-nav-trigger').on('click', function() {
        triggerBouncyNav(true);
    });
    //鍏抽棴鑿滃崟
    $('.cd-bouncy-nav-modal .cd-close').on('click', function() {
        triggerBouncyNav(false);
    });
    $('.cd-bouncy-nav-modal').on('click', function(event) {
        if ($(event.target).is('.cd-bouncy-nav-modal')) {
            triggerBouncyNav(false);
        }
    });
    function triggerBouncyNav($bool) {
        //鐐瑰嚮鑻ユ病鏈夊姩鐢�
        if (!is_bouncy_nav_animating) {
            is_bouncy_nav_animating = true;
            //鍒囨崲鑿滃崟鍔ㄧ敾
            $('.cd-bouncy-nav-modal').toggleClass('fade-in', $bool).toggleClass('fade-out', !$bool).find('li:last-child').one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function() {
                $('.cd-bouncy-nav-modal').toggleClass('is-visible', $bool);
                if (!$bool)
                    $('.cd-bouncy-nav-modal').removeClass('fade-out');
                is_bouncy_nav_animating = false;
            });
            //鍒ゆ柇css 鍔ㄧ敾鏄惁寮€鍚�.. 
            if ($('.cd-bouncy-nav-trigger').parents('.no-csstransitions').length > 0) {
                $('.cd-bouncy-nav-modal').toggleClass('is-visible', $bool);
                is_bouncy_nav_animating = false;
            }
        }
    }
});

$(document).ready(function(){
	$(".showy a").hover(function(){
		$(this).find(".sidebox").stop().delay(500).animate({"width":"185px"},200).css({"opacity":"1","filter":"Alpha(opacity=100)"})	
		$(this).find(".sidebox1").stop().delay(500).animate({"width":"145px"},200).css({"opacity":"1","filter":"Alpha(opacity=100)"})	
	},function(){
		$(this).find(".sidebox").stop().animate({"width":"49px"},200).css({"opacity":"0.8","filter":"Alpha(opacity=80)"})	
		$(this).find(".sidebox1").stop().animate({"width":"49px"},200).css({"opacity":"0.8","filter":"Alpha(opacity=80)"})	
	});
	
});
$(function(){
	
	  $(".nav a").hover(function(){
		  if($(this).attr("class")!="nav_a")
		  {
				$(".nav a").removeClass("nav_a");
				$(".nav a").find(".nav_span1").stop().animate({"width":"0px","opacity":"0.4","filter":"Alpha(opacity=40)"},300,"easeInQuad")	
				$(".nav a").find(".nav_span2").stop().animate({"margin-left":"22px","opacity":"0.4","filter":"Alpha(opacity=40)"},300,"easeInQuad")
				
			  	$(this).addClass("nav_a");
				$(this).find(".nav_span1").stop().animate({"width":"30px","opacity":"1","filter":"Alpha(opacity=100)"},300,"easeInQuad")
				$(this).find(".nav_span2").stop().animate({"margin-left":"10px","opacity":"1","filter":"Alpha(opacity=100)"},300,"easeInQuad")
				
			  }
		
	  });
	  
	})
	



				
$(function(){
	// 婊氬睆
	$('#secParent').fullpage({
		
		navigation: true,
		verticalCentered: false,
		resize: false,
		slidesColor:false,
		easing:'easeInQuart',
		'navigationPosition': 'right',
		autoScrolling:true,
		scrollingSpeed:1000,
		anchors: ['page1', 'page2', 'page3', 'page4', 'page5'],
		menu: '.nav',
		


		afterRender: function(){
			
			$('.hm-sec1').find('.about_1').animate({
							top:"0",
							opacity:1
						},300,function(){
							$('.hm-sec1').find('.about_two').animate({
								left:"0",
								opacity:1
								
							},300,function(){
								$('.hm-sec1').find('.about_three').animate({
									opacity:1,
									right:"0"
								})
							})
						})	

		},
		afterLoad: function(anchorLink, index){
			if(index == 1){
				$('.hm-sec1').find('.about_1').animate({
							top:"0",
							opacity:1
						},300,function(){
							$('.hm-sec1').find('.about_two').animate({
								left:"0",
								opacity:1
								
							},300,function(){
								$('.hm-sec1').find('.about_three').animate({
									opacity:1,
									right:"0"
								})
							})
						})	

					
			}
			if(index == 2){
				$('.hm-sec2').find('.advantage').animate({
							top:"0",
							opacity:1
						},300,function(){
							$('.hm-sec2').find('.client').animate({
								bottom:"0",
								opacity:1
								
							})
						})	
				$(function(){
						var options = {
						useEasing : true, 
						useGrouping : true, 
						separator : ',', 
						decimal : '.', 
						prefix : '', 
						suffix : '' 
					};
					
					var demo = new CountUp("myTargetElement", 0, 35, 0, 2.0, options);
					var demo2 = new CountUp("myTargetElement2", 0, 3, 0, 4.0, options);
					var demo3 = new CountUp("myTargetElement3", 0, 260, 0, 2.0, options);
					demo.start();
					demo2.start();
					demo3.start();
			
					
			})
			}
			if(index == 4){
				$('.hm-sec4').find('.service_left1').animate({
							top:"0",
							opacity:1
						},300,function(){
							$('.hm-sec4').find('.service_right1').animate({
								bottom:"0",
								opacity:1
								
							},300,function(){
								$('.hm-sec4').find('.service_mid1').animate({
									opacity:1,
									top:"0"
								})
							})
						})	
				
			}
			if(index == 5){
				$('.hm-sec5').find('.touch').animate({
							opacity:1
						})	
			}
		},
		onLeave: function(index,nextIndex, direction){
			
			if(index == 1){
				$('.hm-sec1').find('.about_1').animate({
					top:"-100px",
					opacity:0
				}).end().find('.about_two').animate({
					opacity:0,
					left:"-100px"
				}).end().find('.about_three').animate({
					opacity:0,
					right:"0"
				})
			}
			if(index == 2){
				$('.hm-sec2').find('.advantage').animate({
					top:"-100px",
					opacity:0
				}).end().find('.client').animate({
					opacity:0,
					bottom:"-100px"
				})
			}
			if(index == 4){
				$('.hm-sec4').find('.service_left1').animate({
					top:"-200px",
					opacity:0
				}).end().find('.service_right1').animate({
					opacity:0,
					bottom:"-200px"
				}).end().find('.service_mid1').animate({
					opacity:0,
					top:"0"
				})
			}
			if(index == 5){
				$('.hm-sec5').find('.touch').animate({
					opacity:0
				})
			}
		}
		
	});
	$("#siteup").click(function(){
				$('#secParent').fullpage.moveSectionUp();
			})
	$("#sitedown").click(function(){
				$('#secParent').fullpage.moveSectionDown();
			})
	
});				
	
				
				
				
				
$(window).resize(function(){
		if($(window).width()<560 && $(window).width()>=0)
		   { 
			 $(".touch").css('margin-top',($(window).height()-410)/2);
			 $(".advantage").css('margin-top',($(window).height()-285)/2);
			 $(".about").css('margin-top',($(window).height()-420)/2);
			 $(".ke").css('margin-top',($(window).height()-($(window).width()*0.5/1065*691))/2);  
			 $(".ke,.ke img").css({width:$(window).width()*0.7,height:$(window).width()*0.7/1065*691})
			   }
		if($(window).width()<1000 && $(window).width()>=700)
		   {
			$(".map").css('margin-top',($(window).height()-323)/2);  
			 $(".touch").css('margin-top',($(window).height()-410)/2);
			 $(".advantage").css('margin-top',($(window).height()-400)/2);
			 $(".about").css('margin-top',($(window).height()-430)/2);
			 $(".ke").css('margin-top',($(window).height()-($(window).width()*0.5/1065*691))/2-80);  
			 $(".ke,.ke img").css({width:$(window).width()*0.7,height:$(window).width()*0.7/1065*691})
			   }
		if($(window).width()<1366 && $(window).width()>=1000)
		   {
			 $(".map").css('margin-top',($(window).height()-323)/2);  
			 $(".touch").css('margin-top',($(window).height()-450)/2);
			 $(".advantage").css('margin-top',($(window).height()-410)/2);
			 $(".about").css('margin-top',($(window).height()-477)/2);
			$(".ke").css('margin-top',($(window).height()-($(window).width()*0.5/1065*691))/2);  
			 $(".ke,.ke img").css({width:$(window).width()*0.5,height:$(window).width()*0.5/1065*691})
			   }
		if($(window).width()<1440 && $(window).width()>=1366)
		   {
		  	 $(".map").css('margin-top',($(window).height()-323)/2);  
			 $(".touch").css('margin-top',($(window).height()-450)/2);
			 $(".advantage").css('margin-top',($(window).height()-410)/2);
			 $(".about").css('margin-top',($(window).height()-477)/2);
			 $(".ke").css('margin-top',($(window).height()-($(window).width()*0.5/1065*691))/2);  
			 $(".ke,.ke img").css({width:$(window).width()*0.5,height:$(window).width()*0.5/1065*691})
			}
		if($(window).width()<1600 && $(window).width()>=1440)
		   {
		  	 $(".map").css('margin-top',($(window).height()-423)/2);  
			 $(".touch").css('margin-top',($(window).height()-586)/2);
			 $(".advantage").css('margin-top',($(window).height()-390)/2);
			 $(".about").css('margin-top',($(window).height()-437)/2);
			$(".ke").css('margin-top',($(window).height()-($(window).width()*0.5/1065*691))/2);  
			 $(".ke,.ke img").css({width:$(window).width()*0.5,height:$(window).width()*0.5/1065*691})
			}
		if($(window).width()<1910 && $(window).width()>=1600)
		   {
		  	 $(".map").css('margin-top',($(window).height()-423)/2);  
			 $(".touch").css('margin-top',($(window).height()-586)/2);
			 $(".advantage").css('margin-top',($(window).height()-490)/2);
			 $(".about").css('margin-top',($(window).height()-630)/2);
			 $(".ke").css('margin-top',($(window).height()-($(window).width()*0.5/1065*691))/2);  
			 $(".ke,.ke img").css({width:$(window).width()*0.5,height:$(window).width()*0.5/1065*691})
			}
		if($(window).width()>=1920)
		   {
			 $(".ke").css('margin-top',($(window).height()-691)/2); 
			 $(".ke,.ke img").css({width:1065,height:691})
			}
		   })
		 
		  
			
$(function(){
		if($(window).width()<560 && $(window).width()>=0)
		   { 
			 $(".touch").css('margin-top',($(window).height()-410)/2);
			 $(".advantage").css('margin-top',($(window).height()-285)/2);
			 $(".about").css('margin-top',($(window).height()-420)/2);
			 $(".ke1").css('margin-top',($(window).height()-($(window).width()*0.8/516*656))/2);  
			 $(".ke1,.ke1 img").css({width:$(window).width()*0.8,height:$(window).width()*0.8/516*626})
			   }
		if($(window).width()<1000 && $(window).width()>=700)
		   {
			$(".map").css('margin-top',($(window).height()-323)/2);  
			 $(".touch").css('margin-top',($(window).height()-410)/2);
			 $(".advantage").css('margin-top',($(window).height()-400)/2);
			 $(".about").css('margin-top',($(window).height()-430)/2);
			 $(".ke").css('margin-top',($(window).height()-($(window).width()*0.5/1065*691))/2-80);  
			 $(".ke,.ke img").css({width:$(window).width()*0.7,height:$(window).width()*0.7/1065*691})
			   }
		if($(window).width()<1366 && $(window).width()>=1000)
		   {
			 $(".map").css('margin-top',($(window).height()-323)/2);  
			 $(".touch").css('margin-top',($(window).height()-450)/2);
			 $(".advantage").css('margin-top',($(window).height()-410)/2);
			 $(".about").css('margin-top',($(window).height()-477)/2);
			$(".ke").css('margin-top',($(window).height()-($(window).width()*0.5/1065*691))/2);  
			 $(".ke,.ke img").css({width:$(window).width()*0.5,height:$(window).width()*0.5/1065*691})
			   }
		if($(window).width()<1440 && $(window).width()>=1366)
		   {
		  	 $(".map").css('margin-top',($(window).height()-323)/2);  
			 $(".touch").css('margin-top',($(window).height()-450)/2);
			 $(".advantage").css('margin-top',($(window).height()-410)/2);
			 $(".about").css('margin-top',($(window).height()-477)/2);
			 $(".ke").css('margin-top',($(window).height()-($(window).width()*0.5/1065*691))/2);  
			 $(".ke,.ke img").css({width:$(window).width()*0.5,height:$(window).width()*0.5/1065*691})
			}
		if($(window).width()<1600 && $(window).width()>=1440)
		   {
		  	 $(".map").css('margin-top',($(window).height()-423)/2);  
			 $(".touch").css('margin-top',($(window).height()-410)/2);
			 $(".advantage").css('margin-top',($(window).height()-390)/2);
			 $(".about").css('margin-top',($(window).height()-437)/2);
			 
			 $(".ke").css('margin-top',($(window).height()-($(window).width()*0.5/1065*691))/2);  
			 $(".ke,.ke img").css({width:$(window).width()*0.5,height:$(window).width()*0.5/1065*691})
			}
		if($(window).width()<1910 && $(window).width()>=1600)
		   {
		  	 $(".map").css('margin-top',($(window).height()-423)/2);  
			 $(".touch").css('margin-top',($(window).height()-586)/2);
			 $(".advantage").css('margin-top',($(window).height()-490)/2);
			 $(".about").css('margin-top',($(window).height()-630)/2);
			 
			 $(".ke").css('margin-top',($(window).height()-($(window).width()*0.5/1065*691))/2);  
			 $(".ke,.ke img").css({width:$(window).width()*0.5,height:$(window).width()*0.5/1065*691})
			}
		if($(window).width()>=1920)
		   {
			 $(".ke").css('margin-top',($(window).height()-691)/2);  
			 $(".ke,.ke img").css({width:1065,height:691})
			}
})


